package com.mengxin.secondkill.mapper;

import com.mengxin.secondkill.domain.Stock;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StockMapper {
    int deleteByPrimaryKey(Long stockId);

    int insert(Stock record);

    int insertSelective(Stock record);

    Stock selectByPrimaryKey(Long stockId);

    int updateByPrimaryKeySelective(Stock record);

    int updateByPrimaryKey(Stock record);

    List<Stock> getListByGoodsId(@Param("ids") List<Long> ids);

    Stock selectByGoodsModelId(@Param("goodsId")Long goodsId,@Param("modelId")Long modelId);

    void updateStockSum(@Param("goodsId")Long goodsId,@Param("modelId")Long modelId,@Param("sum")Long sum);
}